package top.toptimus.dto.order.orderSync.orderCommit;

import lombok.Data;
import lombok.NoArgsConstructor;
import top.toptimus.constValue.OrderWIPStatusConsts;
import top.toptimus.constValue.PMCOrderStatusConsts;

import java.util.Date;

/**
 * 订单DTO一览
 */
@NoArgsConstructor
@Data
public class OrderCommitOverviewDto {
    private String orderId;
    /**
     * 订单信息
     */
    private String orderNo;//订单号
    private Double orderNumber;//订单数量
    private Date orderDate;//订单时间
    /**
     * 客户信息
     */
    private String customerId;
    private String customerName;
    private String mobile;
    /**
     * 款式信息
     */
    private String refStyleId;//参考款id
    private String styleSizeCd;//尺码
    private String styleNameCn;//款式名称
    /**
     * 门店信息
     */
    private String shopId;
    private String shopName;

    private String wipStatus = OrderWIPStatusConsts.NOT_SCHEDULED;  //  在制品状态 @See top.toptimus.constValue.OrderWIPStatusConsts
    private String orderStatus = PMCOrderStatusConsts.NOT_SCHEDULED;  //  在制品状态 @See top.toptimus.constValue.OrderWIPStatusConsts

    public OrderCommitOverviewDto(
            String orderId,
            String orderNo,
            Double orderNumber,
            Date orderDate,
            String customerId,
            String customerName,
            String mobile,
            String refStyleId,
            String styleSizeCd,
            String styleNameCn,
            String shopId,
            String shopName,
            String wipStatus
    ) {
        this.orderId = orderId;
        this.orderNo = orderNo;
        this.orderNumber = orderNumber;
        this.orderDate = orderDate;
        this.customerId = customerId;
        this.customerName = customerName;
        this.mobile = mobile;
        this.refStyleId = refStyleId;
        this.styleSizeCd = styleSizeCd;
        this.styleNameCn = styleNameCn;
        this.shopId = shopId;
        this.shopName = shopName;
        this.wipStatus = wipStatus;
    }

    public OrderCommitOverviewDto buildOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
        return this;
    }
}
